package com.itmuch.demoprovider.ribbon;

import com.itmuch.demoprovider.ribbon.MyRibbonRule;
import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;

/**
 * 当前服务请求demo-provider时，会使用TestRibbonConfiguration里面的配置
 */
//@Configuration
//@RibbonClient(name = "demo-provider", configuration = TestRibbonConfiguration.class)
public class MyRibbonConfiguration {
}

class TestRibbonConfiguration {
    @Bean
    public IRule randomRule() {
        return new MyRibbonRule();
    }
}